package com.eedi.framework.permission.enums;


import com.eedi.framework.common.exception.ErrorCode;
import com.eedi.org.enums.OrgErrorCode;
import com.eedi.org.enums.OrgErrorCodeType;

/**
 * Org 错误码枚举类
 *
 * org 系统，使用 1-002-000-000 段
 */
public interface OrgPermissionErrorCodeConstants {


    // ========== 菜单模块 ==========
    ErrorCode ORG_MENU_NAME_DUPLICATE = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 1,"已经存在该名字的菜单");
    ErrorCode ORG_MENU_PARENT_NOT_EXISTS = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 2, "父菜单不存在");
    ErrorCode ORG_MENU_PARENT_ERROR = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 3, "不能设置自己为父菜单");
    ErrorCode ORG_MENU_NOT_EXISTS = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 4, "菜单不存在");
    ErrorCode ORG_MENU_EXISTS_CHILDREN = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 5, "存在子菜单，无法删除");
    ErrorCode ORG_MENU_PARENT_NOT_DIR_OR_MENU = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 6, "父菜单的类型必须是目录或者菜单");

    // ========== 角色模块 ==========
    ErrorCode ORG_ROLE_NOT_EXISTS = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 7, "角色不存在");
    ErrorCode ORG_ROLE_NAME_DUPLICATE = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 8, "已经存在名为【{}】的角色");
    ErrorCode ORG_ROLE_CODE_DUPLICATE = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 9, "已经存在编码为【{}】的角色");
    ErrorCode ORG_ROLE_CAN_NOT_UPDATE_ORGTEM_TYPE_ROLE = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 10, "不能操作类型为系统内置的角色");
    ErrorCode ORG_ROLE_IS_DISABLE = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 11, "名字为【{}】的角色已被禁用");
    ErrorCode ORG_ROLE_ADMIN_CODE_ERROR = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 12, "编码【{}】不能使用");

    // ========== 角色模块 ==========
    ErrorCode ORG_PERMISSION_USER_INFO_NOT_EXISTS = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 13, "用户登录信息不存在");

    ErrorCode COMMON_EXCEL_IMPORT_TEMPLATE_ERROR = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 15,"excel导入模板不正确，请下载最新的导入模板！");
    ErrorCode BATCH_CREATE_ROW_LIMIT_EXCEEDED = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 16,"excel批量导入的数据量【{}】超出限定范围（1~2000行之间）");
    ErrorCode MIME_TYPE_UNMATCHED = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 17,"提供的文件类型不正确");
    ErrorCode ORG_TEMPLATE_ROLE_IS_NULL = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 18, "初始化机构角色时，未能获取到模板信息，请与管理员联系！");
    ErrorCode ORG_TEMPLATE_MENU_IS_NULL = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 18, "初始化机构菜单时，未能获取到模板信息，请与管理员联系！");
    ErrorCode ORG_TEMPLATE_ROLE_MENU_IS_NULL = new OrgErrorCode(OrgErrorCodeType.PERMISSION, 18, "初始化机构授权信息时，未能获取到模板信息，请与管理员联系！");


}
